#ifndef _EB0_PLAYER_H_
#define _EB0_PLAYER_H_

#include <EB0/Prereq.h>
#include <EB0/Entities/Entity.h>
#include <EB0/Window/WindowListener.h>

namespace EB0
{
namespace Entities
{
	// An Entity is a Rederable object with a Physical representation
	// to be placed inside of a derived World State.
	class Player : public Entities::Entity, public Window::WindowListener
	{
	public:
		Player();
		~Player();

	private:
		virtual void onAttach(States::World* worldState); // called to create the body
		virtual void onRemove(States::World* worldState); // called to destroy the body

		virtual void step(States::World* worldState, float dt = 0.0f);

		virtual void onKeyPress(Window::RenderWindow* window, const sf::Event::KeyEvent& key); // key input to move the player
		virtual void onKeyRelease(Window::RenderWindow* window, const sf::Event::KeyEvent& key); // key input to move the player

		virtual void Render(sf::RenderTarget& Target) const;

		b2PolygonDef mShapeDef;
		sf::Image* mPlayerImage;
		sf::Sprite* mPlayerSprite;
	};
} // namespace Entities
}

#endif // _EB0_PLAYER_H_